from pony.orm import db_session
from utils.response import ApiResponse
from apps.auth.handler import ApiLogin
from base.core import BaseTornadoHandler


class ApiUser(BaseTornadoHandler):

    @db_session
    @ApiLogin.required
    def get(self):
        self.write(ApiResponse.success(self.current_user.to_dict(exclude=[])))

